var express = require('express');
var router = express.Router();



router.post("/a/", function(req,res,next){
  console.log(req.body)
  console.log(req.auth)
  res.json({
    code: 1,
    msg: "文章发布成功",
  })
})


router.get("/users/:uid",function(req,res,next){
  console.log(req.params)
  res.json({
    code: 1,
    msg: "user文章列表成功",
  })
})



router.get("/a/:aid",function(req,res,next){
  console.log(req.params)
  res.json({
    code: 1,
    msg: "articles文章列表成功",
  })
})


router.delete("/a/:aid",function(req,res,next){
  console.log(req.params)
  res.json({
    code: 1,
    msg: "articles文章删除成功",
  })
})




router.patch("/a/:aid",function(req,res,next){
  console.log(req.params)
  console.log(req.body)
  res.json({
    code: 1,
    msg: "articles文章修改成功",
  })
})



module.exports = router;
